<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加学生</title>
    <link rel="stylesheet" href="css/bootstrap.css">
    <style>
        .container{
            margin-top: 20px;
        }
    </style>
</head>
<body>

<div class="container">
    <form action="SaveStudentServlet" method="post">
        <!-- hidden是隐藏的 .所以界面是看不到的! -->
        <input type="hidden" name="stu_id" value="0">
        <div class="form-group row">
            <label for="stuName" class="col-sm-2 col-form-label">学生姓名:</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="stuName" name="stu_name">
            </div>
        </div>
        <div class="form-group row">
            <label for="stuAge" class="col-sm-2 col-form-label">学生年龄:</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="stuAge" name="stu_age">
            </div>
        </div>
        <fieldset class="form-group">
            <div class="row">
                <legend class="col-form-label col-sm-2 pt-0">学生性别</legend>
                <div class="col-sm-10">
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="stu_gender" id="gridRadios1" value="男" checked>
                        <label class="form-check-label" for="gridRadios1">
                            男
                        </label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="stu_gender" id="gridRadios2" value="女">
                        <label class="form-check-label" for="gridRadios2">
                            女
                        </label>
                    </div>
                </div>
            </div>
        </fieldset>
        <div class="form-group row">
            <div class="col-sm-2">学生喜好</div>
            <div class="col-sm-10">
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="checkbox" id="gridCheck1" name="stu_hobbies" value="足球">
                    <label class="form-check-label" for="gridCheck1">
                        足球
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="checkbox" id="gridCheck2" name="stu_hobbies" value="篮球">
                    <label class="form-check-label" for="gridCheck1">
                        篮球
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="checkbox" id="gridCheck3" name="stu_hobbies" value="排球">
                    <label class="form-check-label" for="gridCheck1">
                        排球
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="checkbox" id="gridCheck4" name="stu_hobbies" value="棒球">
                    <label class="form-check-label" for="gridCheck1">
                        棒球
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-sm-10">
                <button type="submit" class="btn btn-success">添加</button>
            </div>
            <span>
                	<c:if test="${not empty msg}">
                		<c:out value="${msg}"></c:out>
                	</c:if>
                </span>
        </div>
    </form>
</div>

<script src="js/jquery-3.5.1.js"></script>

</body>
</html> 